package com.zengqingfa.examples.mybatisplus.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

/**
 * @fileName: PersonService
 * @author: zengqf3
 * @date: 2021-6-24 10:36
 * @description:
 */
@Component
public class PersonService {

    @Autowired
    private OrderService orderService;

    @Transactional(rollbackFor = Exception.class)
    public void order() {
        System.out.println("==============PersonService start==============");
        System.out.println(this.getClass());
        System.out.println(this.orderService.getClass());
        System.out.println(this);
        System.out.println(this.orderService);
        System.out.println("==============PersonService end==============");
    }
}
